Near field communication (NFC) is a short-range wireless communications technology. It is based on radio frequency identification (RFID) technology, and uses electromagnetic induction to implement short-range communication between electronic devices. A user only needs to touch or approach a device to implement a visual, secure, and contactless information exchange, payment transaction, or the like. NFC operates on a 13.56 MHz frequency, and supports four rates: 106 kbit/s, 212 kbit/s, 424 kbit/s, and 848 kbit/s. NFC can work within a 20-centimeter range, and a typical value is 4 cm. NFC is quite suitable for exchange of small data due to its simple operation and low data transmission rate; for a large file (for example, a high definition picture or a high definition video in scores of megabytes), if NFC is used for transmission, a disadvantage of a low speed seriously affects user experience. Therefore, the NFC Forum puts forward an NFC-based connection handover technology. Two terminals that simultaneously support NFC, Bluetooth, and wireless fidelity (Wi-Fi) may simply touch each other to exchange connection configuration information of Bluetooth or Wi-Fi by using NFC. Afterward, the terminals may use the configuration information to establish a Bluetooth connection or a Wi-Fi connection, and use the established Bluetooth connection or Wi-Fi connection to transmit a large file.
Wi-Fi Direct is an 802.11-based point-to-point connection technology formulated by the Wi-Fi Alliance. Wi-Fi Direct may also be referred to as Wi-Fi point-to-point (Wi-Fi P2P). Wi-Fi Direct uses an 802.11 physical layer, and makes modifications to an existing 802.11 media access control (MAC) layer and higher layers so that the layers are suitable for a scenario in which two devices discover each other and establish a point-to-point connection.
In the prior art, a connection establishment procedure defined by the Wi-Fi Direct protocol includes processes such as device discovery, group owner (GO) negotiation, and exchange of Wi-Fi Protected Setup protocol (WPS) authentication information. The whole connection establishment procedure is relatively complicated and lengthy. In addition, two terminals not joining any group may use a manner defined by the Wi-Fi Direct protocol to establish a connection. A terminal not joining any group may use a manner defined by the Wi-Fi Direct protocol to join an existing group and communicate with a GO or with a client (Client) in the group through the GO. Due to restrictions of the Wi-Fi Direct protocol, a client in a group and a GO or client in another group cannot discover each other and further establish a connection and communicate with each other.